(**
 * @copyright (C) 2021 SML# Development Team.
 * @author UENO Katsuhiro
 *)
structure LoadFileError =
struct

  (*%
   * @formatter(Filename.filename) Filename.format_filename
   * @formatter(RequirePath.path) RequirePath.format_path
   * @formatter(InterfaceName.interface_name)
   *   InterfaceName.format_short_interface_name
   *)
  exception

  (*%
   * @format(string)
   * "not" +d "an" +d "interface:" +d string
   *)
  NotAnInterface of Filename.filename

  and
  (*%
   * @format(string)
   * "file" +d "not" +d "found" +d "on" +d "load" +d "path:" +d string
   *)
  FileNotFoundOnPath of RequirePath.path

  and
  (*%
   * @format(string)
   * "detected" +d "circular" +d "file" +d "reference:" +d string
   *)
  CircularLoad of Filename.filename

  and
  (*%
   * @format(symbol)
   * "unexpected" +d "_interface" +d "found:" +d symbol
   *)
  UnexpectedInterfaceDecl of RequirePath.path

  and
  (*%
   * @format(iname1 * iname2)
   * "duplicate" +d "interface" +d "found:" +d iname1
   * +d "conflict" +d "with" +d iname2
   *)
  DuplicateHash of InterfaceName.interface_name
                   * InterfaceName.interface_name

  and
  (*%
   * @format(string)
   * "use" +d "without" +d "declaration:" +d string
   *)
  UseNotAllowed of RequirePath.path

  and
  (*%
   * @format
   * "empty" +d "path"
   *)
  PathMustNotBeEmpty

  and
  (*%
   * @format(path)
   * "absolute" +d "path" +d "is" +d "not" +d "allowed:" +d path
   *)
  AbsolutePathNotAllowed of RequirePath.path

  and
  (*%
   * @format(path)
   * "path" +d "indicating" +d "a" +d "direcoty:" +d path
   *)
  DirectoryPathNotAllowed of RequirePath.path

  and
  (*%
   * @format(string)
   * "_use" +d "and" +d "_require" +d "the" +d "same" +d "file:" +d string
   *)
  UseRequireConflict of Filename.filename

  and
  (*%
   * @format(string)
   * "unknown" +d "require" +d "option:" +d string
   *)
  UnknownRequireOption of string

end
